GetLoop

Syntax

Sound:GetLoop(Number soundhandler, Boolean return)

Description

Determines if a sound buffer is looping or not.

Number soundhandler - a Number variable handling the sound buffer loaded using Sound:Load.

Boolean return - a Boolean variable that will handle the sound buffer's loop status.

Note

soundhandler should be handling a sound buffer from Sound:Load.

Example

#include "console.kh"
 
function main() {
  Var:Number snd; //declares a Number variable to be the sound-handler
  Var:Boolean looping; //declares a Boolean variable to be the looping flag
 
  Sound:Load("bgmusic.ogg", snd) //loads a sound file to buffer to be handled by 'snd'
 
  Sound:Play(snd) //plays the sound buffer handled by 'snd'
 
  Sound:GetLoop(snd, looping) //determines if 'snd' is looping
  if (looping) {
    write("it is looping")
  } else {
    write("it is not looping")
  }
  end()
}
www.konsolscript.org
© 2005-2011 KonsolScript Labs | All Rights Reversed | Licensed under GNU GPL | Designed by Mj Mendoza IV
http://www.sourceforge.net